#include<stdio.h>
#include<fcntl.h>
#include<unistd.h>

int main(int argc,char*argv[])
{
    if(argc<2)
    {
        perror("参数太少");
        return - 1;
    }

    const char *file = argv[1];
    int fd = open(file, O_RDWR);

    int ret1 = lseek(fd, 20,SEEK_SET );
    if(ret1==-1)
    {
        perror("write");
        return -1;
    }

    write(fd, "teacher", sizeof("teacher")-1);

    ret1 = lseek(fd, 41, SEEK_SET);
    if (ret1 == -1)
    {
        perror("write");
        return -1;
    }
    write(fd, "teacher", sizeof("teacher") - 1);

    close(fd);

    return 0;
}